import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import axios from 'axios';
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/global.css'

Vue.config.productionTip = false
Vue.use(ElementUI, { size: "small"});

// new Vue({
//   router,
//   render: h => h(App)
// }).$mount('#app')

axios.get('http://localhost:6174/api/getRandomPathKey')
    .then(response => {
      // 将随机值存储到localStorage
      localStorage.setItem('randomPathKey', response.data.data);
      console.log("get random path key: ", localStorage.getItem('randomPathKey'));
      // 启动Vue应用
      new Vue({
        router,
        render: h => h(App)
      }).$mount('#app');
    })
    .catch(error => {
      console.error("Error fetching random value:", error);
    });